import { listResolution } from "@/api/service/resolution/resolution";
import { IResolution } from "@/api/service/resolution/types";
import { ITemplate } from "@/api/service/template/types";

export const resolutionList = ref();
export const tableConfig = ref({
  data: [] as Array<ITemplate>,
  pageSize: 10,
  total: 0,
  current: 1
});
export const getResolution = () => {
  listResolution().then((res) => {
    const rows = res.rows as Array<IResolution>;
    if (!rows) return;
    resolutionList.value = rows.map((item: IResolution) => {
      return {
        value: item.resolutionId,
        label: item.description
      };
    });
  });
};
